home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / vdl020d.zip / VDOSHIGH.DOC < prev    next >
Text File  |  1993-04-14  |  4KB  |  176 lines

  1. {
  2. ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix DOS High-Level Functions Unit (VDOSHIGH)
  5.  Copyright 1991,92,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8. ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  --------  --------  -------------------------------------------------------
  14.  
  15.   lpg      03/25/93  Added: GetVolLabel,GetFileSysType
  16.  
  17.   lpg      03/15/93  Added Source Documentation
  18.  
  19.   jrt      03/08/93  First logged revision.  Took functions from VGEn
  20.                      and moved them here.
  21.  
  22. ════════════════════════════════════════════════════════════════════════════
  23. }
  24.  
  25.  
  26. UNIT VDOSHigh;
  27.  
  28.  
  29.  
  30. Uses
  31.  
  32.   DOS,
  33.   VTypes,
  34.   VGen,
  35.   VDos;
  36.  
  37. {────────────────────────────────────────────────────────────────────────────}
  38.  
  39.  
  40. {------------------}
  41. { Diskette and DOS }
  42. {------------------}
  43.  
  44. Function  GetDOSVersion                        : WORD;
  45.  
  46. Function  DisketteStatus(            Drive     : WORD    ) : BYTE;
  47.  
  48. Function  FloppyReady(               Drive     : WORD    ) : BOOLEAN;
  49.  
  50. Function  PutSlash(                  S         : STRING  ) : STRING;
  51.  
  52. Function  UnPutSlash(                S         : STRING  ) : STRING;
  53.  
  54. Function  PutDot(                    S         : STRING  ) : STRING;
  55.  
  56. Function  UnPutDot(                  S         : STRING  ) : STRING;
  57.  
  58. Function  FileExist(                 fn        : PathStr ) : BOOLEAN;
  59.  
  60. Function  GetFileTime(               fn        : PathStr ) : LONGINT;
  61.  
  62. Function  GetFileAttr(               fn        : PathStr ) : WORD;
  63.  
  64. Function  GetFileSize(               fn        : PathStr ) : LONGINT;
  65.  
  66. Function  DirExist(                  stDir     : DirStr  ) : BOOLEAN;
  67.  
  68. Function  DirEmpty(                  stDir     : DirStr  ) : BOOLEAN;
  69.  
  70. Function  EraseDir(                  stDir     : DirStr  ) : BOOLEAN;
  71.  
  72. Function  PredDir(                   stDir     : DirStr  ) : DirStr;
  73.  
  74. Function  InDir(                     stDir     : DirStr  ) : DirStr;
  75.  
  76. Procedure MkSubDir(                  S         : STRING  );
  77.  
  78. Function  MaskWildcards(             fn        : PathStr;
  79.                                      fnMask    : PathStr ) : PathStr;
  80.  
  81. Procedure FileCRC16(                 FName     : STRING;
  82.                                  Var Result    : WORD    );
  83.  
  84. Procedure FileCRC32(                 FName     : STRING;
  85.                                  Var Result    : LONGINT );
  86.  
  87.  
  88. Function  GetVolLabel(            Drive          : BYTE      ) : STRING;
  89.  
  90. Function  GetFileSysType(         Drive          : BYTE      ) : STRING;
  91.  
  92. {────────────────────────────────────────────────────────────────────────────}
  93. {────────────────────────────────────────────────────────────────────────────}
  94.  
  95.  
  96.  
  97. ──────────────────────────────────────────────────────────────────────────────
  98.  
  99.  
  100. [FUNCTION]
  101.  
  102. Function  GetVolLabel(            Drive          : BYTE      ) : STRING;
  103.  
  104. [PARAMETERS]
  105.  
  106. Drive       Source Drive Number (0=Default)
  107.  
  108. [RETURNS]
  109.  
  110. The Volume Label of the Selected Drive
  111.  
  112. [DESCRIPTION]
  113.  
  114. Retrieves the Volume Label String from the selected Drive.
  115. If there was an Error the String comes back empty.
  116.  
  117. [SEE-ALSO]
  118.  
  119. GetFileSysType
  120. DOS_GetMediaID { VDOS }
  121. DOS_SetMediaID { VDOS }
  122.  
  123. [EXAMPLE]
  124.  
  125. VAR
  126.   S : STRING;
  127.  
  128. BEGIN
  129.  
  130.   S := GetVolLabel( 0 );
  131.  
  132.   { S comes back as whatever the current drive Volume Label is }
  133.  
  134. END;
  135.  
  136.  
  137. ──────────────────────────────────────────────────────────────────────────────
  138.  
  139.  
  140. [FUNCTION]
  141.  
  142. Function  GetFileSysType(         Drive          : BYTE      ) : STRING;
  143.  
  144. [PARAMETERS]
  145.  
  146. Drive       Source Drive Number (0=Default)
  147.  
  148. [RETURNS]
  149.  
  150. File System Type Text of the selected Drive
  151.  
  152. [DESCRIPTION]
  153.  
  154. Retrieves the File System Type String from the selected Drive.
  155. If there was an Error the String comes back empty.
  156.  
  157. [SEE-ALSO]
  158.  
  159. GetVolLabel
  160. DOS_GetMediaID { VDOS }
  161. DOS_SetMediaID { VDOS }
  162.  
  163. [EXAMPLE]
  164.  
  165. VAR
  166.   S : STRING;
  167.  
  168. BEGIN
  169.  
  170.   S := GetFileSysType( 0 );
  171.  
  172.   { S = 'FAT16' - for this example }
  173.  
  174. END;
  175.  
  176.